﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class pro_misInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["levelmissionid"] != null)
        {
            string state = MasApp.BLL.Search.SearchLevelMissionState(int.Parse(Request["levelmissionid"].ToString()));
            if (state == "在做的")
            {
                Response.Redirect("level/editlevel.aspx?levelmissionid=" + Request["levelmissionid"].ToString());
            }
        }
        else
        {
            MasApp.BLL.ResponseHelper.alert("非法链接", "misList.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int misid = int.Parse(Request["levelmissionid"].ToString());
        if (MasApp.BLL.Update.UpdateLevelMission(misid) == 1)
        {
            MasApp.BLL.ResponseHelper.alert("您已经接受了此任务，前往填写评价信息……", "level/editlevel.aspx?levelmissionid=" + misid.ToString());
        }
        else
        {
            MasApp.BLL.ResponseHelper.alert("系统出错了", "mislist.aspx");
        }
    }
    protected void CGo()
    {
    }
}
